package la.iok.hzsvn.lewin.movie.operation.timer;

import la.iok.hzsvn.lewin.movie.operation.cfg.PlayRecordAutoEndProperties;
import la.iok.hzsvn.lewin.movie.operation.service.LuckyMoneyService;
import la.iok.hzsvn.lewin.movie.operation.service.PlayRecordService;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;

/**
 * 定时任务配置
 */
@Configuration
@EnableScheduling
public class ScheduleTaskConfiguration {
    @Bean
    public ReturnMoneyScheduleService returnMoneyScheduleService(PlayRecordService playRecordService,
                                                                 LuckyMoneyService luckyMoneyService){
        return new ReturnMoneyScheduleService(playRecordService, luckyMoneyService);
    }

    @Bean
    public PlayRecordAutoEndScheduleService playRecordAutoEndScheduleService(
            PlayRecordService playRecordService, PlayRecordAutoEndProperties playRecordAutoEndProperties){
        return new PlayRecordAutoEndScheduleService(playRecordService, playRecordAutoEndProperties);
    }
}
